﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store Manager/SM_panel.master" AutoEventWireup="true" CodeFile="SM_StockRPT.aspx.cs" Inherits="Store_Manager_SM_StockRPT" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2.Export, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <dx:ASPxButton ID="btnXlsExport" runat="server" Text="Export to XLS" UseSubmitBehavior="False"
                    OnClick="btnXlsExport_Click" ClientIDMode="AutoID" 
            CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
            SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" />
    
    <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
        ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
        CssPostfix="BlackGlass" DataSourceID="SqlDataSource1" Width="100%">
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0">
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn Caption="Stock ID" FieldName="Sto_ID" 
                ReadOnly="True" VisibleIndex="0">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Item ID" FieldName="Pro_ID" 
                VisibleIndex="1">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Item Code" FieldName="Code" 
                VisibleIndex="2">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Item" FieldName="Pro_Name" VisibleIndex="3">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Main Stock" FieldName="Qty_in_stock" 
                VisibleIndex="4">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Kandy Quantity" FieldName="Kandy_Quantity" 
                VisibleIndex="10">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Panadura Quantity" FieldName="Expr1" 
                VisibleIndex="11">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsPager PageSize="25">
        </SettingsPager>
        <Settings ShowFilterRow="True" />
        <Images SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/BlackGlass/GridView/gvLoadingOnStatusBar.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/BlackGlass/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
            CssPostfix="BlackGlass">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
        </Styles>
        <StylesEditors>
            <CalendarHeader Spacing="1px">
            </CalendarHeader>
            <ProgressBar Height="25px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
        SelectCommand="SELECT Tbl_Stock.Sto_ID, Tbl_Stock.Pro_Name, Tbl_Stock.Qty_in_stock, Tbl_Stock.Re_Order_Level, Tbl_Stock.Re_Order_qty, Tbl_Stock.User_Create, Tbl_Stock.Date_Create, Tbl_Stock.Last_Modify, Tbl_Stock.Key_Timestamp, Tbl_Issue_Stock.Kandy_Quantity, Tbl_Issue_Stock.Qty_in_stock AS Expr1, Tbl_Issue_Stock.Pro_ID, Tbl_Issue_Stock.Code FROM Tbl_Stock INNER JOIN Tbl_Issue_Stock ON Tbl_Stock.Pro_Name = Tbl_Issue_Stock.Pro_Name AND Tbl_Stock.Pro_ID = Tbl_Issue_Stock.Pro_ID">
    </asp:SqlDataSource>

        <dx1:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="ASPxGridView1">
        </dx1:ASPxGridViewExporter>
    </asp:Content>

